

    <div class="form">
        <?php $form=$this->beginWidget('CActiveForm', array(
        'id'=>'xlogrec-form',
        'enableAjaxValidation'=>false,
    )); ?>

        <p class="note">Fields with <span class="required">*</span> are required.</p>

        <?php echo $form->errorSummary($model); ?>

        <div class="row">
            <?php echo $form->labelEx($model,'custno'); ?>
            <?php echo $form->dropDownList($model, 'custno', Po::model()->getCustomersList()); ?>
            <?php echo $form->error($model,'custno'); ?>
            <div class="model-data">
                <?php echo   $model->custno; ?>
            </div>
        </div>
        <div class="row">
            <?php echo $form->labelEx($model,'entrydate'); ?>
            <?php
            $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                'model' => $model,
                'attribute' => 'entrydate',
                'value' => CTimestamp::formatDate('Y-m-d', $model->entrydate),
                'options' => array('dateFormat' => 'yy-m-d'),

            ));
            ?>
            <?php echo $form->error($model,'entrydate'); ?>

            <?php echo $form->labelEx($model,'paymethod'); ?>
            <?php echo $form->dropDownList($model, 'paymethod',PaymentMethods::getList()); ?>
            <?php echo $form->error($model,'paymethod'); ?>
        </div>
        <div class="row">
            <?php echo $form->labelEx($model,'invoice'); ?>
            <?php echo $form->textField($model,'invoice',array('size'=>7,'maxlength'=>7)); ?>
            <?php echo $form->error($model,'invoice'); ?>
        </div>


        <div class="row">
            <?php echo $form->labelEx($model,'depno'); ?>
            <?php echo $form->dropDownList($model, 'depno', Invoice::model()->getDepartments()); ?>
            <?php echo $form->error($model,'depno'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model,'jobnumber'); ?>
            <?php echo $form->dropDownList($model, 'jobnumber', Jobs::getList()); ?>
            <?php echo $form->error($model,'jobnumber'); ?>
        </div>


        <div class="row">
            <?php echo $form->labelEx($model,'ckno'); ?>
            <?php echo $form->textField($model,'ckno',array('size'=>12,'maxlength'=>12)); ?>
            <?php echo $form->error($model,'ckno'); ?>
        </div>


        <div class="row">
            <?php echo $form->labelEx($model,'amount'); ?>
            <?php echo $form->textField($model,'amount',array('size'=>10,'maxlength'=>10)); ?>
            <?php echo $form->error($model,'amount'); ?>
        </div>










        <div class="row buttons">
            <?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
        </div>

        <?php $this->endWidget(); ?>

    </div><!-- form -->